
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bd_over_time_order]') AND type IN ('U'))
	DROP TABLE [dbo].[bd_over_time_order]
GO
CREATE TABLE [dbo].[bd_over_time_order](
	[order_id] [int] NOT NULL,
	[order_no] [varchar](50) NOT NULL,
	[ot_date] [date] NULL,
	[sum_user] [int] NULL,
	[sum_minute] [int] NULL,
	[reason] [varchar](500) NULL,
	[status] [int] NULL,
	[examine_user] [varchar](50) NULL,
	[create_user] [varchar](50) NULL,
	[create_time] [datetime] NULL,
	[is_delete] [int] NULL,
	[workshop_approver] [varchar](255) NULL,
	[labour_union_approver] [varchar](255) NULL,
	[is_leave] [int] NULL
) ON [PRIMARY]

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班单ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'order_id'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班单编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'order_no'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'ot_date'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班人数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'sum_user'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班总时长' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'sum_minute'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转移到了从表lr_jiaba' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'reason'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加班单状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'status'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审批人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'examine_user'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提交人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'create_user'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提交时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'create_time'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0,1) 1表示删除' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'is_delete'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级审批人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'workshop_approver'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工会审批人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'labour_union_approver'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'调休还是支付加班费' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bd_over_time_order', @level2type=N'COLUMN',@level2name=N'is_leave'
GO

